<div class="products view">
<h2><?php  __('Product');?></h2>
	<dl><?php $i = 0; $class = ' class="altrow"';?>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $product['Product']['id']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Name'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $product['Product']['name']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Description'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $product['Product']['description']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Cost'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $product['Product']['cost']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Costvalidfrom'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $product['Product']['costvalidfrom']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Costvalidto'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $product['Product']['costvalidto']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Category'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $this->Html->link($product['Category']['name'], array('controller' => 'categories', 'action' => 'view', $product['Category']['id'])); ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Status'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $product['Product']['status']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Created'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $product['Product']['created']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Modified'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $product['Product']['modified']; ?>
			&nbsp;
		</dd>
	</dl>
</div>
<div class="related">
	<h3><?php __('Related Documents');?></h3>
	<?php if (!empty($product['Document'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('Id'); ?></th>
		<th><?php __('Name'); ?></th>
		<th><?php __('Description'); ?></th>
		<th><?php __('Path'); ?></th>
		<th><?php __('Product Id'); ?></th>
		<th><?php __('Validfrom'); ?></th>
		<th><?php __('Validto'); ?></th>
		<th><?php __('Employee Id'); ?></th>
		<th><?php __('Status'); ?></th>
		<th><?php __('Created'); ?></th>
		<th><?php __('Modified'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($product['Document'] as $document):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $document['id'];?></td>
			<td><?php echo $document['name'];?></td>
			<td><?php echo $document['description'];?></td>
			<td><?php echo $document['path'];?></td>
			<td><?php echo $document['product_id'];?></td>
			<td><?php echo $document['validfrom'];?></td>
			<td><?php echo $document['validto'];?></td>
			<td><?php echo $document['employee_id'];?></td>
			<td><?php echo $document['status'];?></td>
			<td><?php echo $document['created'];?></td>
			<td><?php echo $document['modified'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View', true), array('controller' => 'documents', 'action' => 'view', $document['id'])); ?>
				<?php echo $this->Html->link(__('Edit', true), array('controller' => 'documents', 'action' => 'edit', $document['id'])); ?>
				<?php echo $this->Html->link(__('Delete', true), array('controller' => 'documents', 'action' => 'delete', $document['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $document['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>
</div>
<div class="related">
	<h3><?php __('Related Potentials');?></h3>
	<?php if (!empty($product['Potential'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('Id'); ?></th>
		<th><?php __('User Id'); ?></th>
		<th><?php __('Product Id'); ?></th>
		<th><?php __('Type'); ?></th>
		<th><?php __('Dateenquired'); ?></th>
		<th><?php __('Description'); ?></th>
		<th><?php __('Leadstage Id'); ?></th>
		<th><?php __('Dealstage Id'); ?></th>
		<th><?php __('Employee Id'); ?></th>
		<th><?php __('Assignedtoemployee Id'); ?></th>
		<th><?php __('Location Id'); ?></th>
		<th><?php __('Status'); ?></th>
		<th><?php __('Created'); ?></th>
		<th><?php __('Modified'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($product['Potential'] as $potential):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $potential['id'];?></td>
			<td><?php echo $potential['user_id'];?></td>
			<td><?php echo $potential['product_id'];?></td>
			<td><?php echo $potential['type'];?></td>
			<td><?php echo $potential['dateenquired'];?></td>
			<td><?php echo $potential['description'];?></td>
			<td><?php echo $potential['leadstage_id'];?></td>
			<td><?php echo $potential['dealstage_id'];?></td>
			<td><?php echo $potential['employee_id'];?></td>
			<td><?php echo $potential['assignedtoemployee_id'];?></td>
			<td><?php echo $potential['location_id'];?></td>
			<td><?php echo $potential['status'];?></td>
			<td><?php echo $potential['created'];?></td>
			<td><?php echo $potential['modified'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View', true), array('controller' => 'potentials', 'action' => 'view', $potential['id'])); ?>
				<?php echo $this->Html->link(__('Edit', true), array('controller' => 'potentials', 'action' => 'edit', $potential['id'])); ?>
				<?php echo $this->Html->link(__('Delete', true), array('controller' => 'potentials', 'action' => 'delete', $potential['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $potential['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>
</div>
